package server

import (
	"github.com/gin-gonic/gin"
	"github.com/gorilla/websocket"
)

func index(context *gin.Context) {
	//context.JSON(200, gin.H{`a`: `a`})
	if websocket.IsWebSocketUpgrade(context.Request) {
		WsHandler(context)
	} else {
		//ipStr := context.ClientIP()
		context.HTML(200, "index.html", nil)
	}
}
